﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfServiceLibrary1
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class Service1 : IService1
    {
        public List<TD_LogDA_entry> getTD_LogDA()
        {
            
            var Emplist = new List<TD_LogDA_entry>();

            testDBEntities3 EmpData = new testDBEntities3();

            foreach (var Emp in EmpData.TD_LogDA.ToList())
            {

                TD_LogDA_entry GetEmp = new TD_LogDA_entry();

                GetEmp.IDThayDoi =(int) Emp.IDThayDoi;
                GetEmp.NoiDungSauTD = Emp.NoiDungSauTD;
                GetEmp.NoiDungTruocTD = Emp.NoiDungTruocTD;
                GetEmp.SoBNhan = Convert.ToInt32(Emp.SoBNhan);
                GetEmp.TenTruongTD = Emp.TenTruongTD;


                Emplist.Add(GetEmp);

            }

            return Emplist;

        }
    }
}
